﻿/* 枚举管理样式 */

#enum-panel {
    display: grid;
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
    gap: 0;
    height: 100%;
}

#enum-panel .panel-header {
    grid-column: 1 / -1;
}

#enum-panel .enum-list {
    grid-column: 1 / 2;
    grid-row: 2;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

#enum-panel #enum-editor {
    grid-column: 2 / 3;
    grid-row: 2;
    overflow-y: auto;
    padding: 0;
}

.enum-values-container {
    padding: 20px;
}

.enum-basic-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    padding: 20px;
}

.enum-basic-info-grid .form-group-full {
    grid-column: 1 / -1;
}

.enum-values-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.enum-values-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.enum-values-actions {
    display: flex;
    gap: 8px;
}

.enum-values-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 15px;
}

.enum-value-item {
    display: grid;
    grid-template-columns: 150px 100px 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.enum-value-item .form-group {
    margin: 0;
}

.enum-value-item label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.enum-value-item input {
    width: 100%;
}

.enum-value-item .btn-delete {
    margin-top: 22px;
}

/* 枚举预览 */
.modal-content-large {
    max-width: 800px;
    width: 90%;
}

.enum-preview-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 15px 0;
}

.enum-preview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.enum-preview-key {
    font-weight: 600;
    min-width: 120px;
}

.enum-preview-value {
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    min-width: 80px;
}

.enum-preview-binary {
    font-family: 'Courier New', monospace;
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}

.enum-preview-binary span {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
}

.enum-preview-binary .bit-1 {
    background: #2ecc71;
    color: white;
}

.enum-preview-binary .bit-0 {
    background: #e74c3c;
    color: white;
}

.enum-preview-label {
    color: #95a5a6;
    font-style: italic;
}

/* 事件枚举样式 */
.event-enum-item {
    width: 100%;
}

.event-enum-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.event-enum-row .form-group {
    flex: 1;
    margin: 0;
}

.event-params-group {
    flex: 1 !important;
}

.event-params-list {
    margin-bottom: 10px;
    min-height: 50px;
    padding: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.empty-params {
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.event-param-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr 2fr auto;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.event-param-item input {
    font-size: 13px;
}

.event-param-item .param-key {
    grid-column: 1;
}

.event-param-item .param-type {
    grid-column: 2;
}

.event-param-item .param-desc {
    grid-column: 3;
}

.event-param-item button {
    grid-column: 4;
    height: 100%;
}

.enum-value-item:has(.event-enum-item) {
    grid-template-columns: 1fr auto;
}

.enum-value-item:has(.event-enum-item) .btn-delete {
    margin-top: 0;
}

